<?php
/**
 * Created by PhpStorm.
 * User: chen
 * Date: 2016/9/22
 * Time: 14:18
 * 用户表-验证器
 */
namespace app\home\validate;
use think\Validate;
class User extends Validate {
    // 验证规则
    protected $rule = [
        ['account', 'require', '账号必须填写'],
        ['pwd', 'require', '密码不能为空'],
        ['pwded', 'require|confirm:pwd', '确认密码不能为空|二次密码输入不一致'],
        ['uname', 'require', '昵称必须填写'],
    ];

    // 验证场景
    protected $scene = [
        'login'   =>  ['account','pwd'],
    ];
}